package net.interneteidee.backingbean.filter;


 
import java.io.Serializable;
 
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
 

import net.interneteidee.entity.Prodotto;

import org.richfaces.model.Filter;
 
@ManagedBean
@ViewScoped
public class ProdottoFilteringBean implements Serializable {
    /**
     *
     */
    private static final long serialVersionUID = -5680001353441022183L;
    private String provenienza;
    
    private String vinFilter;
    private String vendorFilter;
    private String modelFilter;
    private Long mileageFilter;
    private Long priceFilter;
 
//    public Filter<?> getMileageFilterImpl() {
//        return new Filter<Prodotto>() {
//            public boolean accept(Prodotto item) {
//                Long mileage = getMileageFilter();
//                if (mileage == null || mileage == 0 || mileage.compareTo(item.getMileage().longValue()) >= 0) {
//                    return true;
//                }
//                return false;
//            }
//
//			
//        };
//    }
// 
//    public Filter<?> getFilterVendor() {
//        return new Filter<Prodotto>() {
//            public boolean accept(Prodotto t) {
//                String vendor = getVendorFilter();
//                if (vendor == null || vendor.length() == 0 || vendor.equals(t.getVendor())) {
//                    return true;
//                }
//                return false;
//            }
//        };
//    }
 
    public Long getMileageFilter() {
        return mileageFilter;
    }
 
    public void setMileageFilter(Long mileageFilter) {
        this.mileageFilter = mileageFilter;
    }
 
    public String getVendorFilter() {
        return vendorFilter;
    }
 
    public void setVendorFilter(String vendorFilter) {
        this.vendorFilter = vendorFilter;
    }
 
    public String getVinFilter() {
        return vinFilter;
    }
 
    public void setVinFilter(String vinFilter) {
        this.vinFilter = vinFilter;
    }
 
    public String getModelFilter() {
        return modelFilter;
    }
 
    public void setModelFilter(String modelFilter) {
        this.modelFilter = modelFilter;
    }
 
    public Long getPriceFilter() {
        return priceFilter;
    }
 
    public void setPriceFilter(Long priceFilter) {
        this.priceFilter = priceFilter;
    }
}